<template>
  <div :class="type">
    <div class="list">
      <div class="item" v-for="(item,index) in list" :key="index" @click="handRight(item)">
        <div class="item-box">
          <img class="item-img" :src="item._artistPortrait" alt />
          <div class="name" :style="color=='black'?'color:#000':''">{{item.artistName}}</div>
          <div class="post" :style="color=='black'?'color:#000':''">{{item.artistPosition}}</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    type: {
      type: String,
      default: 'build-el-time-right', //大标题 2中标题 3小标题
    },
    color: {
      type: String,
      default: 'white', //white/black
    },
    list: {
      type: Array,
      default: () => [], //white/black
    },
  },
  data() {
    return {}
  },
  methods: {
    handRight(item) {
      console.log(item)
      window.open(
        'http://www.cbda1984.com/h5/#/personDetail?recordId=' + item.recordId
      )
    },
  },
}
</script>
<style scoped lang="less">
.build-el-time-right-nobg {
  margin-bottom: 40px;
  width: 100%;
  border-radius: 6px;
  padding-bottom: 0;
  box-sizing: border-box;
  &:last-child {
    margin-bottom: 0px;
  }
  .list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    .item {
      text-align: center;
      margin-bottom: 50px;
      .item-box {
        width: 140px;

        .name {
          color: #fff;
          font-size: 18px;
          margin: 6px 0;
          font-weight: bolder;
        }
        .post {
          color: #fff;
          font-size: 14px;
        }
        .item-img {
          width: 140px;
          height: 160px;
          background-size: cover;
          -webkit-clip-path: polygon(
            50% 0,
            100% 25%,
            100% 75%,
            50% 100%,
            0 75%,
            0 25%
          );
          clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
        }
      }
    }
  }
}
.build-el-time-right {
  margin-bottom: 40px;
  width: 100%;
  border-radius: 6px;
  padding-bottom: 0;
  box-sizing: border-box;
  .list {
    display: flex;
    flex-wrap: wrap;
    .item {
      width: 33.33%;
      text-align: center;
      margin-bottom: 20px;
      .item-box {
        width: 80px;
        margin: 0 auto;
        .name {
          color: #333333;
          font-size: 14px;
          margin: 6px 0;
          font-weight: bold;
        }
        .post {
          color: #666;
          font-size: 11px;
        }
        .item-img {
          width: 80px;
          height: 80px;
          border-radius: 50%;
        }
      }
    }
  }
}
</style>
